//
// Created by syj on 2024/3/14.
//

#ifndef TRANSMIDDLE_UTILS_H
#define TRANSMIDDLE_UTILS_H

#include <string>
#include "middle/log/common/common.h"
#include "middle/log/service/log_config.h"
#include "middle/log/service/log_msg.h"

namespace log{
    std::ostream &operator<<(std::ostream &os, log::LogMode mode);

    /**
     * @brief 解析配置文件.
     *
     * @param config_file_path  配置文件路径
     * @param config    解析完成后的配置信息
     */
    void ParseConfig(const std::string &config_file_path, log::LogConfig &config);

    /** 获取进程名称 */
    std::string GetProcessName(pid_t pid = 0);
}//namespace log

#endif //TRANSMIDDLE_UTILS_H
